"""
URL configuration for djangoProject1 project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.http import HttpResponse
from django.urls import path, include

from index import views, views2
from django.urls import path


# def home(request):
#     return HttpResponse("Django WebSocket服务器运行正常")


urlpatterns = [
    path("admin/", admin.site.urls),
    # path('', home),
    # path('index/', views.index),
    # path('something/', views.something, name='something'),
    # path('Virtual_station/SingleChange/', views.single_change, name='SingleChange'),


    # 返回信息
    # 返回基站固定信息：基站位置信息
    path("virtual_scene/bs_info/", views.api_bs_info, name="bs_info"),

    # 返回用户固定信息：时刻，用户数量，用户位置信息
    path("virtual_scene/user_info/", views.api_user_info, name="user_info"),

    # 返回最终优化结果
    path("virtual_scene/final_res/", views.api_final_res, name="final_res"),
    # 演示版本
    # path("virtual_scene/final_res/", views.api_final_res_demo, name="final_res"),

    # 设置单一或者多个基站
    path("virtual_station/single_bs/", views.single_bs, name="bs_set_single"),
    path("virtual_station/multiple_bs/",  views.multiple_bs, name="bs_set_multiple"),

    # 设置仿真场景
    path("virtual_scene/set_para/", views.set_para, name="set_para"),

    # 控制真实基站
    path("real_station/",  views.real_station, name="control_real_station"),

    # 前端获取48小时内光伏、逆变器功率
    path("virtual_station/power_graph/", views2.power_graph, name="power_graph"),
    # 申请修改寄存器充放电数据
    path("virtual_station/Pv_Data_Change/", views2.pv_data_change, name="Pv_Data_Change"),

    path('sirtual_szemylfinal_rst/', views2.optimize_network, name='optimize'),

    # path('virtual_scene/current', views.current_parameter),

    path("demo1/", views.demoapi1),
    path("demo2/", views.demoapi2),
    path('virtual_station/login/', views.loginPart),
    # path("cheatdemo/", views.cheat_check)
    #
    # path("startloop/", views.start_demo_loop),
    # path("endloop/", views.stop_demo_loop)
]